import {constances} from "./index";

const defaultState = {
  detail: []
};

export default function (state = defaultState, action) {
  switch (action.type) {
    case constances.CHANGE_DETAIL:
      const newState = JSON.parse(JSON.stringify(state));
      newState.detail = action.data;
      return newState;
    default:
      return state;
  }
}